<template>
<div>
  <h1>分类展示</h1>
  <table border="1" cellspacing="0" align="center">
    <tr>
      <td>分类名称</td>
      <td>总数</td>
    </tr>
    <tr v-for="i in catelist">
      <td>{{i.classname}}</td>
      <td>{{i.count}}</td>
    </tr>
  </table>
</div>
</template>

<script>
export default {
  name: "bcate1",
  data(){
    return{
      catelist:[],
    }
  },
  methods:{
    get_catelist(){
      this.axios.get('users/bcate/')
      .then(res=>{
        console.log(res.data)
        this.catelist=res.data.catelist
      })
    },
  },
  mounted() {
    this.get_catelist()
  }
}
</script>

<style scoped>

</style>
